from django.db import models


# Create your models here.


# 图片库信息表
class T_picture(models.Model):
    id = models.AutoField('图片ID', primary_key=True)
    movie_id = models.IntegerField('电影ID')
    url = models.CharField('图片地址', max_length=255)
    appear_time = models.DateTimeField('图片出现时间', null=True)
    parise_num = models.IntegerField('点赞数', default=0)
    star_num = models.IntegerField('收藏数', default=0)
    click_num = models.IntegerField('点击数', default=0)
    remark = models.CharField('备注', max_length=45, null=True)

    class Meta:
        verbose_name_plural = '图库信息表'


# 图片标签表
class T_picture_target(models.Model):
    id = models.AutoField('ID', primary_key=True)
    target = models.CharField('标签', max_length=20)
    remark = models.CharField('备注', max_length=45, null=True)

    class Meta:
        verbose_name_plural = '图片标签表'


# 图片分类表
class T_picture_class(models.Model):
    id = models.AutoField('ID', primary_key=True)
    target_id = models.IntegerField('标签ID')
    picture_id = models.IntegerField('图片ID')
    remark = models.CharField('备注', max_length=45, null=True)

    class Meta:
        verbose_name_plural = '图片分类表'
